<!-- 写一个vue3的模板 -->
<template>
    <ContentWrap style="height: 100%;">
      <div style="display: flex; justify-content: center; align-items: center; height: 100%">
        <Qrcode :text="url" />
      </div>
      <p style="text-align: center;"> 扫码分享微信好友或者朋友圈，每个新用户成功充值1元以上，即可获得1元红包。</p>
  </ContentWrap>
 </template>
<script setup lang="ts" name="share">
import { getUserProfile, ProfileVO } from '@/api/system/user/profile';
const currentUrl = window.location.origin + '/index';
const url = ref('')
const userInfo = ref({} as ProfileVO)
const getUserInfo = async () => {
  const users = await getUserProfile()
  userInfo.value = users
  url.value = `${currentUrl}?reference=${userInfo.value.id}`
}
onMounted(async () => {
  await getUserInfo()
})
</script>
